// 轮播图逻辑实现
import { ref, onMounted } from 'vue'
import { findBanner } from '@/api/home'

export function useBanner () {
  // 轮播图
  const slidersRef = ref([])
  async function loadSiders () {
    const {
      data: { result }
    } = await findBanner()
    slidersRef.value = result
  }
  onMounted(() => {
    loadSiders()
  })
  return {
    slidersRef
  }
}
